Optimal. Leaf size=170 \[ \frac{2 (A-C) \sqrt{b \tan (c+d x)} \tan ^{m+1}(c+d x) \text{Hypergeometric2F1}\left (1,\frac{1}{4} (2 m+3),\frac{1}{4} (2 m+7),-\tan ^2(c+d x)\right )}{d (2 m+3)}+\frac{2 B \sqrt{b \tan (c+d x)} \tan ^{m+2}(c+d x) \text{Hypergeometric2F1}\left (1,\frac{1}{4} (2 m+5),\frac{1}{4} (2 m+9),-\tan ^2(c+d x)\right )}{d (2 m+5)}+\frac{2 C \sqrt{b \tan (c+d x)} \tan ^{m+1}(c+d x)}{d (2 m+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.143555, antiderivative size = 170, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.122, Rules used = {20, 3630, 3538, 3476, 364} \[ \frac{2 (A-C) \sqrt{b \tan (c+d x)} \tan ^{m+1}(c+d x) \, _2F_1\left (1,\frac{1}{4} (2 m+3);\frac{1}{4} (2 m+7);-\tan ^2(c+d x)\right )}{d (2 m+3)}+\frac{2 B \sqrt{b \tan (c+d x)} \tan ^{m+2}(c+d x) \, _2F_1\left (1,\frac{1}{4} (2 m+5);\frac{1}{4} (2 m+9);-\tan ^2(c+d x)\right )}{d (2 m+5)}+\frac{2 C \sqrt{b \tan (c+d x)} \tan ^{m+1}(c+d x)}{d (2 m+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 20
Rule 3630
Rule 3538
Rule 3476
Rule 364
Rubi steps
\begin{align*} \int \tan ^m(c+d x) \sqrt{b \tan (c+d x)} \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx &=\frac{\sqrt{b \tan (c+d x)} \int \tan ^{\frac{1}{2}+m}(c+d x) \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx}{\sqrt{\tan (c+d x)}}\\ &=\frac{2 C \tan ^{1+m}(c+d x) \sqrt{b \tan (c+d x)}}{d (3+2 m)}+\frac{\sqrt{b \tan (c+d x)} \int \tan ^{\frac{1}{2}+m}(c+d x) (A-C+B \tan (c+d x)) \, dx}{\sqrt{\tan (c+d x)}}\\ &=\frac{2 C \tan ^{1+m}(c+d x) \sqrt{b \tan (c+d x)}}{d (3+2 m)}+\frac{\left (B \sqrt{b \tan (c+d x)}\right ) \int \tan ^{\frac{3}{2}+m}(c+d x) \, dx}{\sqrt{\tan (c+d x)}}+\frac{\left ((A-C) \sqrt{b \tan (c+d x)}\right ) \int \tan ^{\frac{1}{2}+m}(c+d x) \, dx}{\sqrt{\tan (c+d x)}}\\ &=\frac{2 C \tan ^{1+m}(c+d x) \sqrt{b \tan (c+d x)}}{d (3+2 m)}+\frac{\left (B \sqrt{b \tan (c+d x)}\right ) \operatorname{Subst}\left (\int \frac{x^{\frac{3}{2}+m}}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d \sqrt{\tan (c+d x)}}+\frac{\left ((A-C) \sqrt{b \tan (c+d x)}\right ) \operatorname{Subst}\left (\int \frac{x^{\frac{1}{2}+m}}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d \sqrt{\tan (c+d x)}}\\ &=\frac{2 C \tan ^{1+m}(c+d x) \sqrt{b \tan (c+d x)}}{d (3+2 m)}+\frac{2 (A-C) \, _2F_1\left (1,\frac{1}{4} (3+2 m);\frac{1}{4} (7+2 m);-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x) \sqrt{b \tan (c+d x)}}{d (3+2 m)}+\frac{2 B \, _2F_1\left (1,\frac{1}{4} (5+2 m);\frac{1}{4} (9+2 m);-\tan ^2(c+d x)\right ) \tan ^{2+m}(c+d x) \sqrt{b \tan (c+d x)}}{d (5+2 m)}\\ \end{align*}
Mathematica [A] time = 0.512908, size = 133, normalized size = 0.78 \[ \frac{2 \sqrt{b \tan (c+d x)} \tan ^{m+1}(c+d x) \left ((2 m+5) (A-C) \text{Hypergeometric2F1}\left (1,\frac{1}{4} (2 m+3),\frac{1}{4} (2 m+7),-\tan ^2(c+d x)\right )+B (2 m+3) \tan (c+d x) \text{Hypergeometric2F1}\left (1,\frac{1}{4} (2 m+5),\frac{1}{4} (2 m+9),-\tan ^2(c+d x)\right )+C (2 m+5)\right )}{d (2 m+3) (2 m+5)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.435, size = 0, normalized size = 0. \begin{align*} \int \left ( \tan \left ( dx+c \right ) \right ) ^{m}\sqrt{b\tan \left ( dx+c \right ) } \left ( A+B\tan \left ( dx+c \right ) +C \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (C \tan \left (d x + c\right )^{2} + B \tan \left (d x + c\right ) + A\right )} \sqrt{b \tan \left (d x + c\right )} \tan \left (d x + c\right )^{m}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{b \tan{\left (c + d x \right )}} \left (A + B \tan{\left (c + d x \right )} + C \tan ^{2}{\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]